<template>
	<view class="body" >
		
		<view class="header">
			<view class="header-item" >
				成功邀请
				<view class="item" >
					<text class="number"  >{{info.number}}</text>人
				</view>
			</view>
			<view class="header-item" >
				累计奖励
				<view class="item" >
					<text class="number" >{{info.zongmoney}}</text>元
				</view>
			</view>
		</view>
		
		<view class="list-view" >
			<view class="title" >团队成员</view>
			<view class="list-item" v-for="(item,index) in list" >
				
				<view class="left-img" >
					<image :src="item.head_portrait" ></image>
				</view>
				<view class="left" >
					<view>{{item.nick_name}}</view>
					<view class="text1" >{{item.phone}}</view>
				</view>
				<view class="center" >
					<view>
						<text class="text1" >类型：</text>
						<text>{{item.type}}</text>
					</view>
					<view>
						<text class="text1" >时间：</text>
						<text>{{item.time}}</text>
					</view>
				</view>
				<view class="text2" >
					消费金额{{item.money ? item.money : 0}}
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default{
		
		data(){
			return{
				info: {}   ,//信息
				list: []
			}
		},
		onLoad() {
			this.getGroup()
		},
		methods:{
			
			getGroup(){
				this.$https.Mine.myTeam().then(req => {
					console.log('获取团队成员',req)
					this.info = req
					this.list = req.list
				})
			}
		}
	}
</script>

<style lang="scss" >
	
	page,.body{
		width: 100%;
		height: 100%;
		
		background-color: rgb(250,250,250);
	}
	
	.header{
		display: flex;
		align-items: center;
		justify-content: space-evenly;
		
		margin: 20rpx;
		
		height: 120rpx;
		background-color: #FFFFFF;
		font-size: $uni-font-size-base;
		
		.header-item{
			text-align: center;
			
			.item{
				color: #ccc;
			}
			.number{
				padding: 10rpx 6rpx 0 0;
				color: $uni-color-error;
			}
		}
	}
	
	.list-view{
		margin: 20rpx;
	
		background-color: #FFFFFF;
		border-radius: 10rpx;
		
		.title{
			padding: 20rpx;
			font-size: $uni-font-size-base;
		}
		
		.list-item{
			display: flex;
			justify-content: space-evenly;
			
			margin: 0 20rpx;
			padding: 20rpx 0;
			
			border-bottom: 1rpx solid rgb(245,245,245);
			font-size: $uni-font-size-sm;
			
			.left-img{
				margin-right: 14rpx;
				
				width: 70rpx;
				height: 70rpx;
				
				border-radius: 70rpx;
				
				image{
					width: 100%;
					height: 100%;
					border-radius: 70rpx;
				}
			}
			
			.text1{
				color: #CCCCCC;
			}
			
			.text2{
				color: $uni-color-error;
			}
		}
	}
	
</style>
